home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / usatlx01.arc / USAT.SLT < prev   
Text File  |  1991-06-23  |  7KB  |  217 lines

  1. /////////////////////////////  USAT.SLT  ////////////////////////////////
  2. //  by Dave Appel, 6/23/91.
  3. //
  4. // Fidonet:  Dave Appel at 1:231/30    I X.400 mail:
  5. // Internet: dappel@ehsnet.fidonet.org I  COUNTRY = US
  6. // US Mail:  POBox 24802,INDY,IN,46224 I  ADMD = WESTERN UNION
  7. // Relaynet: Dave Appel at ICC         I  ORG = DAVID APPEL
  8. // GEnie:    DAVE.APPEL                I  DDA.ELN=62877725
  9. // Western Union:  ESL 6287-7725       I
  10. //
  11. //  This script will 
  12. //   1. open the USATODAY door 
  13. //   2. capture all the articles using menu items #1 through #19.
  14. //   3. All captured articles will be logged to the file USATmmdd. Where
  15. //      'mm' is the current month, and 'dd' is the current day.
  16. //   4. Log you off.
  17. //
  18. //  Then you can read this file with your word processor or LIST.COM.
  19. //
  20. //  If you like this script, send me a "thank-you" message at one
  21. //  of the above addresses.
  22. //
  23. //////////////////////////////////////////////////////////////////////////
  24.  int stat;
  25.  int timenow;
  26.  int monthnow;
  27.  int daynow;
  28.  str str_month[2] , str_day[2] , log_file_name[12];
  29.  int t1, t2, t3, t4, t5;
  30.  int tmark;
  31.  
  32. main()
  33. {
  34.  t1 = track ("Command?", 1);
  35.  t2 = track ("(NS)non-stop?", 1);
  36.  t3 = track ("Press (Enter) to continue:", 1);
  37.  
  38.  itos( tmonth(curtime()) , str_month);      //  get the month in a string
  39.  itos( tday(curtime())   , str_day);        //  get the day in a string
  40.  log_file_name = "USAT";
  41.  if ( tmonth(curtime()) < 10 )
  42.     strcat (log_file_name, "0" );           // put in a leading 0
  43.  strcat (log_file_name , str_month);        // add month to filename
  44.  if ( tday(curtime()) < 10)
  45.     strcat (log_file_name, "0" );           // put in a leading 0
  46.  strcat (log_file_name , str_day);          // add day to filename
  47.  
  48.  prints (" ");
  49.  printsc_trm("^[[7m");                      // display filename in reverse
  50.  printsc ("^m^j Capture file will be:");    // video
  51.  printsc (log_file_name);
  52.  printsc_trm("^[[0m");
  53.  prints (".");
  54.  
  55.  cputs ("USATODAY^M");                      // open the USATODAY door.
  56.  
  57.  capture (log_file_name);                   // capture file is USATmmdd
  58.  
  59.  waitfor (" continue:",90);
  60.  cputs("^M");
  61.  
  62.  stat = track_hit (0);
  63.  
  64. ///////////////////////////////// FILE 1
  65.  if (waitfor ("Command?",90))
  66.      cputs("1^M");                           // select item #1 on menu
  67.  else
  68.      prints("Error waiting for USATODAY menu.");
  69.  do_the_more_stuff (); 
  70. ///////////////////////////////// FILE 2
  71.  if (waitfor ("Command?",90))
  72.      cputs("2^M");
  73.  else
  74.      prints("Error waiting for USATODAY menu.");
  75.  do_the_more_stuff (); 
  76. ///////////////////////////////// FILE 3
  77.  if (waitfor ("Command?",90))
  78.      cputs("3^M");
  79.  else
  80.      prints("Error waiting for USATODAY menu.");
  81.  do_the_more_stuff (); 
  82. ///////////////////////////////// FILE 4
  83.  if (waitfor ("Command?",90))
  84.      cputs("4^M");
  85.  else
  86.      prints("Error waiting for USATODAY menu.");
  87.  do_the_more_stuff (); 
  88. ///////////////////////////////// FILE 5
  89.  if (waitfor ("Command?",90))
  90.      cputs("5^M");
  91.  else
  92.      prints("Error waiting for USATODAY menu.");
  93.  do_the_more_stuff (); 
  94. ///////////////////////////////// FILE 6
  95.  if (waitfor ("Command?",90))
  96.      cputs("6^M");
  97.  else
  98.      prints("Error waiting for USATODAY menu.");
  99.  do_the_more_stuff (); 
  100. ///////////////////////////////// FILE 7
  101.  if (waitfor ("Command?",90))
  102.      cputs("7^M");
  103.  else
  104.      prints("Error waiting for USATODAY menu.");
  105.  do_the_more_stuff (); 
  106. ///////////////////////////////// FILE 8
  107.  if (waitfor ("Command?",90))
  108.      cputs("8^M");
  109.  else
  110.      prints("Error waiting for USATODAY menu.");
  111.  do_the_more_stuff (); 
  112. ///////////////////////////////// FILE 9
  113.  if (waitfor ("Command?",90))
  114.      cputs("9^M");
  115.  else
  116.      prints("Error waiting for USATODAY menu.");
  117.  do_the_more_stuff (); 
  118. ///////////////////////////////// FILE 10
  119.  if (waitfor ("Command?",90))
  120.      cputs("10^M");
  121.  else
  122.      prints("Error waiting for USATODAY menu.");
  123.  do_the_more_stuff (); 
  124. ///////////////////////////////// FILE 11
  125.  if (waitfor ("Command?",90))
  126.      cputs("11^M");
  127.  else
  128.      prints("Error waiting for USATODAY menu.");
  129.  do_the_more_stuff (); 
  130. ///////////////////////////////// FILE 12
  131.  if (waitfor ("Command?",90))
  132.      cputs("12^M");
  133.  else
  134.      prints("Error waiting for USATODAY menu.");
  135.  do_the_more_stuff (); 
  136. ///////////////////////////////// FILE 13
  137.  if (waitfor ("Command?",90))
  138.      cputs("13^M");
  139.  else
  140.      prints("Error waiting for USATODAY menu.");
  141.  do_the_more_stuff (); 
  142. ///////////////////////////////// FILE 14
  143.  if (waitfor ("Command?",90))
  144.      cputs("14^M");
  145.  else
  146.      prints("Error waiting for USATODAY menu.");
  147.  do_the_more_stuff (); 
  148. ///////////////////////////////// FILE 15
  149.  if (waitfor ("Command?",90))
  150.      cputs("15^M");
  151.  else
  152.      prints("Error waiting for USATODAY menu.");
  153.  do_the_more_stuff (); 
  154. ///////////////////////////////// FILE 16
  155.  if (waitfor ("Command?",90))
  156.      cputs("16^M");
  157.  else
  158.      prints("Error waiting for USATODAY menu.");
  159.  do_the_more_stuff (); 
  160. ///////////////////////////////// FILE 17
  161.  if (waitfor ("Command?",90))
  162.      cputs("17^M");
  163.  else
  164.      prints("Error waiting for USATODAY menu.");
  165.  do_the_more_stuff (); 
  166. ///////////////////////////////// FILE 18
  167.  if (waitfor ("Command?",90))
  168.      cputs("18^M");
  169.  else
  170.      prints("Error waiting for USATODAY menu.");
  171.  do_the_more_stuff (); 
  172. ///////////////////////////////// FILE 19
  173.  if (waitfor ("Command?",90))
  174.      cputs("19^M");
  175.  else
  176.      prints("Error waiting for USATODAY menu.");
  177.  do_the_more_stuff (); 
  178. //////////////////////////////////
  179.  if (waitfor ("Command?",90))
  180.      cputs("G^M");                                   // log off the bbs
  181.  else
  182.      prints("Error waiting for USATODAY menu.");
  183.  
  184.  capture ("*CLOSE*");                             // close the capture file
  185.  
  186. }              
  187. //////////////// end of main ///////////////////
  188.  
  189. do_the_more_stuff()
  190.  
  191. {
  192.  timer_free(tmark);
  193.  tmark = timer_start (3000);         // wait up to 5 minutes 
  194.  while (not time_up (tmark))
  195.   {
  196.     terminal();
  197.     stat = track_hit (0);
  198.     if (stat == t2)
  199.       {
  200.         cputs("NS^M");          // Answer "non stop" to the "More:" prompt
  201.       }
  202.     else if (stat == t3)
  203.           {
  204.             cputs("^M");
  205.             break;              // "Press (Enter) to continue:" prompt
  206.           }                     // This indicates the END of the ARTICLE
  207.   }
  208.  
  209.  if (time_up (tmark))
  210.     prints ("^gError in waiting for end of article.");
  211.  
  212.  timer_free(tmark);                   // free up the timer
  213. }
  214.  
  215. ///////////////////// end of source for USAT.SLT ////////////////////
  216.  
  217.